﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class salary_standardController : Controller
    {
        private readonly Isalary_standard he;

        public salary_standardController(Isalary_standard he)
        {
            this.he = he;
        }

        public IActionResult salary_standard()
        {
            ViewBag.id = HttpContext.Session.GetString("id");
            return View();
        }

        public async Task<string> Fall()
        {
            return await he.Fall(); ;
        }
        public async Task<string> FallT(string id)
        {
            return await he.FallT(id);
        }
        //查询公共属性薪酬数据
        public async Task<string> Auto(string name)
        {
            return await he.Auto(name);
        }
        //薪酬标准添加
        public async Task<int> Insert(salary_standard salary_)
        {
            return await he.Insert(salary_);
        }
        //薪酬标准详细添加
        public async Task<int> Inserte(salary_standard_details salary_)
        {
            return await he.Inserte(salary_);
        }
    }
}
